
###
 # @version: 
 # @Company: 
 # @author: TK
 # @LastEditors: TK
 # @LastEditTime: 2022-12-29
 # @description: 
 # @FilePath: \yarn-link.sh
 # @since: 2022-12-29
###

#project_path=$(cd `dirname $0`; pwd)
#project_name="${project_path##*/}"
#
#line_id=2
#old_val='2'
#new_val="$packageBaseName/$project_name"
#sed -e "$line_id s@$old_val@$new_val@" -i package.json

cd $(dirname $0)
BASE=$(pwd)
packageBaseName='Tea'

utilsPack="@$packageBaseName/utils"
modelPack="@$packageBaseName/model"

cd $BASE/package/utils
yarn link

cd $BASE/package/model
yarn link 

cd $BASE/package/utils
yarn link $modelPack
cd $BASE/package/model
yarn link $utilsPack

cd $BASE/package/service
yarn link $modelPack
yarn link $utilsPack

cd $BASE/package/management
yarn link $modelPack
yarn link $utilsPack

cd $BASE/package/app
yarn link $modelPack
yarn link $utilsPack

cd $BASE/package/admin
yarn link $modelPack
yarn link $utilsPack